<?php
	$arrOpcoes       = ( isset($arrOpcoes) )? $arrOpcoes: array();
	$arrDescValCampo = ( isset($arrDescValCampo) )? $arrDescValCampo: array();
	$arrIdsDados     = ( isset($arrIdsDados) )? $arrIdsDados: array();
?>
<?php
	echo '<div class="links">';
	echo html::anchor('/iptu/detalharByInscricao/' . urlencode($inscricao) . '/' . urldecode($id_transacao_alterar) . '/' ,'Voltar', array('data-role' => 'button' , 'data-icon' => 'back' , 'data-inline' => 'true' , 'data-transition' => 'fade' , 'style' => 'float:left;') );
	?>
	<a href='javascript:document.formOpcoes.submit();' data-role='button' data-icon='forward' data-inline='true' data-transition='slideup' style='float:right'>Avançar</a>
	<?php
	echo '</div>';
	echo '<br />';
	echo 'Log.: <strong>' . urldecode($strLogradouro) . '</strong> nº: <strong>' . urldecode($numlog) . '</strong> Comp.: <strong>' . urldecode($complog) . '</strong>';

	$strLink  = 'iptu/informarMudancas/';
	$strLink .= urlencode($strLogradouro) . '/';
	$strLink .= urlencode($numlog)		  . '/';
	$strLink .= urlencode($complog)		  . '/';
	$strLink .= urlencode($inscricao)	  . '/';
	$strLink .= urlencode($id_transacao_alterar);

?>

<form name="formOpcoes" action="<?php echo url::site($strLink); ?>" method="post">
	<table style="width: 100%;" >
		<tbody>
			<?php
				
				$objClienteSoap = new ClienteSoap_Model();

				foreach($arrOpcoes as $key => $arrLinha ) {

					$arrParam['codtab']	= $arrDescValCampo[ $arrLinha['valor'] ];
					$arrDados = $objClienteSoap->executarWebMetodo('retornarValCampoPorCodTab', $arrParam);
			?>
					<tr>
						<td>
							<input type="checkbox" id="chkInformarDetalhes<?php echo $key;  ?>"
								   name="chkInformarDetalhes[]"
								   value="<?php echo $arrLinha['valor']; ?>"
							/>
						</td>
						<td>
							<label for="chkInformarDetalhes<?php echo $key;  ?>">
								<?php echo $arrLinha['descricao']; ?>
<!--							</label>-->
<!--						</td>-->
			<?php
						foreach ($arrDados as $arrRow) {
							if ( $arrRow['CODCAMPO'] == $arrIdsDados['id_' . $arrLinha['valor'] ] ) {
//								echo '<td>';
//								echo	'<label for="chkInformarDetalhes' . $key .'" >';
								echo		': ' . $arrRow['DESCCAMPO'];
//								echo		$arrRow['DESCCAMPO'] . ' - ' . $arrRow['PONTUACAO'];
								echo	'</label>';
								echo '</td>';
								break;
							}
						}
			?>
					</tr>
			<?php
				}
			?>
		</tbody>
	</table>
</form>
<?php
	echo '<div class="links">';
	echo html::anchor('/iptu/detalharByInscricao/' . urlencode($inscricao) . '/' . urldecode($id_transacao_alterar) . '/' ,'Voltar', array('data-role' => 'button' , 'data-icon' => 'back' , 'data-inline' => 'true' , 'data-transition' => 'fade' , 'style' => 'float:left;') );
	?>
	<a href='javascript:document.formOpcoes.submit();' data-role='button' data-icon='forward' data-inline='true' data-transition='slideup' style='float:right'>Avançar</a>
	<?php
	echo '</div>';
?>
